﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TranshipmentReport.aspx.cs"
    Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <!--#include virtual="include/Head.ascx"-->
    <script src="assets/jquery/jquery.printElement.js" type="text/javascript"></script>
    <style type="text/css">
        .thheader
        {
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        
        table.adminlist td
        {
            padding: 7px !important;
        }
        
        table.adminlist thead th
        {
            padding: 7px !important;
        }
        
        table.adminlist thead th
        {
            padding: 7px !important;
            font-weight: bold;
            vertical-align: middle;
            text-align: center;
            font-size: 11px;
            border: 1px solid #ccc !important;
            line-height: 12px !important;
        }
        
        .tdboder
        {
            border: none !important;
        }
        
        .tdboder p
        {
            padding: 1px !important;
            width: 40px;
            border: 1px solid #ccc !important;
            border-bottom: 1px solid #ccc !important;
        }
        
        input[type=text], input[type=password], textarea, select
        {
            border: none;
            line-height: 22px; /*width: 100% !important;*/
        }
        
        input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        
        input[type=text]:hover, input[type=password]:hover, textarea:hover, select:hover
        {
            border-color: #4488cc;
            border-style: solid;
            border-width: 1px;
            margin: 0;
            background-color: #FCFFC5 !important;
        }
        
        span
        {
            font-size: 12px;
        }
        
        .bottom td
        {
            font-weight: bold;
            text-align: center;
        }
        
        td.row
        {
            border-bottom: 1px solid #E9E9E9;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#Export").click(function () {
                var vid = getUrlVars()['ID'];
                window.open("./TranshipmentReport.aspx?action=export&id=" + vid, "TranshipmentReportExp", "menubar=0,status=0,directories=0,resizable=1,scrollbars=1,width=720,height=500");
            });
            if (getUrlVars()['action'] == "export") {
                printElem({ overrideElementCSS: ['assets/css/print.css'] });
            }
        });
        function printElem(options) {
            $('#body-wrapper').printElement(options);

        }
    </script>
</head>
<body>
    <div id="body-wrapper">
        <div id="main-content">
            <h2>
                <%--<img src="Assets/images/Logo_Blue_text_blue.png" alt="" />--%>
            </h2>
            <div class="clear">
            </div>
            <div class="content-box">
                <form id="frmEdit" runat="server">
                <div class="content-box-header">
                    <h3 style="cursor: s-resize;">
                        Transhipment Report
                    </h3>
                    <%if (Request.QueryString["action"] != null && Request.QueryString["action"].ToString() == "export")
                      { %>
                    <%}
                      else
                      { %>
                    <div id="action_button">
                        <input id="Button1" type="button" style="float: right; margin: 9px 10px;" class="button"
                            value="&nbsp;&nbsp;Exit&nbsp;&nbsp;" onclick="window.close()" />
                        <asp:Button class="button" ID="btnSave" Style="float: right; margin: 9px 10px;" runat="server"
                            Text="Save" OnClick="btnSave_Click" Visible="false" />
                        <input type="button" id="Export" class="button" runat="server" style="float: right;
                            margin: 9px 10px;" value="Export" visible="false" />
                    </div>
                    <%} %>
                    <div class="clear">
                    </div>
                </div>
                <div>
                    <table class="paramlist admintable " width="100%">
                        <tr>
                            <td class="key" align="left" width="20%">
                                TO MESSRS:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblSHPR" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                ATTN :
                            </td>
                            <td align="left" class="row">
                                <asp:TextBox ID="txtTRANSATTN" runat="server" BorderStyle="None"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                FROM:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblUserName" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="key" align="left" width="20%">
                                DATE:
                            </td>
                            <td align="left" class="row">
                                <asp:Label ID="lblTRANSUPDATE" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                Kindly refer herewith transhipment report for your cargo
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                        <tr style="background: #ECECEC;">
                            <td class="thheader">
                                BILL NO
                            </td>
                            <td class="thheader">
                                VOL
                            </td>
                            <td class="thheader">
                                G.W (KGS)<%--Tổng trọng lượng--%>
                            </td>
                            <td class="thheader">
                                MEAS. (CBM)<%--Số khối--%>
                            </td>
                        </tr>
                        <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                            <td align="center">
                                <asp:Label ID="lblBillNo" runat="server" Width="85%"></asp:Label>
                            </td>
                            <td>
                                <%= spdVOL_group%>
                            </td>
                            <td>
                                <%=spdGW_Sum.ToString("#,#.##")%>
                            </td>
                            <td>
                                <%=spdMEAS_Sum.ToString("#,#.##")%>
                            </td>
                        </tr>
                    </table>
                    <asp:Repeater ID="rptTracking" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td align="center">
                                    <asp:Label ID="txtLocation" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "Location")%>'
                                        CssClass="txtLocation"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="lblETDAccept" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ETDAcceptStatus")%>'> </asp:Label>
                                </td>
                                <td align="center">
                                    <asp:CheckBox ID="cbETDAccept" runat="server" Checked='<%#Eval("ETDAccept").ToString()=="1"?true:false%>'
                                        Enabled="false" />
                                </td>
                                <td>
                                    <asp:Label ID="txtTrackingDate" runat="server" CssClass="calendar-icon trackingdate"
                                        Text='<%# DataBinder.Eval(Container.DataItem, "TrackingDate")%>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="txtVssl" runat="server" CssClass="txtVssl" Text='<%# DataBinder.Eval(Container.DataItem, "Vssl")%>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="txtVoyno" runat="server" CssClass="txtVoyno" Text='<%# DataBinder.Eval(Container.DataItem, "Voyno")%>'></asp:Label>
                                </td>
                                <td>
                                    <asp:Label ID="txtDischarge" runat="server" CssClass="txtDischarge" Text='<%# DataBinder.Eval(Container.DataItem, "Discharge")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label ID="lblETAAccept" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ETAAcceptStatus")%>'></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:CheckBox ID="cbETAAccept" runat="server" Checked='<%#Eval("ETAAccept").ToString()=="1"?true:false%>'
                                        Enabled="false" />
                                </td>
                                <td>
                                    <asp:Label ID="txtETA" runat="server" CssClass="calendar-icon trackingdateETA" Text='<%# DataBinder.Eval(Container.DataItem, "ETA")%>'></asp:Label>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist"
                                style="margin-top: 10px;">
                                <thead>
                                    <tr>
                                        <th align="center" class="thheader">
                                            LOADING<%--Địa phương--%>
                                        </th>
                                        <th align="center" class="thheader" colspan="3">
                                            DEPARTURE<%--Ngày tháng--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VSSL<%--Tên chuyến tàu--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            VOY NO<%--Số chuyến--%>
                                        </th>
                                        <th align="center" class="thheader">
                                            DISCHARGE<%--Cang di--%>
                                        </th>
                                        <th align="center" class="thheader" colspan="3">
                                            ARRIVAL<%--Ngay den--%>
                                        </th>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    <table class="paramlist admintable " width="100%">
                        <tr>
                            <td align="left">
                                If having any changes, I will adv you later.
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <%-- FOR BACH VIET SHIPPING CO., LTD--%>
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>
        </div>
    </div>
</body>
</html>
